<template>
  <div class="home-container">
    <van-nav-bar
      @click-right="$router.push('/user/chat')"
      class="app-nav-bar"
      title="网咯资讯"
    >
      <template #right>
        <van-icon name="chat-o" dot size="18" />
      </template>
    </van-nav-bar>
    <!-- 文章列表 -->
    <article-list ref="refresh" />
    <!-- /文章列表 -->
  </div>
</template>

<script>
import ArticleList from './components/article-list'
export default {
  components: {
    ArticleList
  },
  props: {},
  data () {
    return {

    }
  },
  computed: {},
  watch: {
    '$route.params.refresh' () {
      if (this.$route.params.refresh) this.$refs.refresh.onRefresh()
    }
  },
  created () {},
  mounted () {},
  methods: {

  }
}
</script>

<style scoped lang="less">
.home-container {
  /deep/ .van-nav-bar__title {
    max-width: none;
  }
  .search-btn {
    width: 277px;
    height: 32px;
    background: #5babfb;
    border: none;
    .van-icon {
      font-size: 16px;
    }
    .van-button__text {
      font-size: 14px;
    }
  }

  .channel-tabs {
    /deep/ .van-tab {
      border-right: 1px solid #edeff3;
      border-bottom: 1px solid #edeff3;
    }
    /deep/ .van-tabs__line {
      bottom: 20px;
      width: 15px !important;
      height: 3px;
      background: #3296fa;
    }
  }

  .wap-nav-placeholder {
    width: 33px;
    flex-shrink: 0;
  }

  .wap-nav-wrap {
    position: fixed;
    right: 0;
    width: 33px;
    height: 43px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.9;
    .van-icon {
      font-size: 24px;
    }
    &:before {
      content: "";
      width: 1px;
      background: url("./line.png") no-repeat;
      background-size: contain;
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
    }
  }
}
</style>
